using AutoMapper;
using Common.Utility;
using Interface.Volcengine;
using Interface.Volcengine.DTO.CVProcess;
using Microsoft.AspNetCore.Mvc;

namespace Api.Controllers
{
    public class VolcengineController : BaseController
    {

        private readonly IHttpClientFactory _httpClientFactory;
        private readonly VolcengineApi _volcengineApi;
        public VolcengineController(IHttpContextAccessor httpContextAccessor, RedisUtil redisUtil, IMapper mapper, 
            IHttpClientFactory httpClientFactory, VolcengineApi volcengineApi) : base(httpContextAccessor, redisUtil, mapper)
        {
            _httpClientFactory = httpClientFactory;
            _volcengineApi = volcengineApi;
        }

        [HttpGet]
        public async Task<CVProcessResponse> CVProcessTest(string prompt)
        {
            return await _volcengineApi.CVProcessAsync(prompt);
        }
    }
}
